package com.vhall.component.entity.notice.vo;


import com.fasterxml.jackson.annotation.JsonProperty;
import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author xianglei
 * @date 2021/4/22 19:55
 */
@Data
public class NoticeListVO implements Serializable {

    private static final long serialVersionUID = 1407090670406366593L;

    @NotBlank(message = "不能为空")
    @Pattern(regexp = "[0-9a-zA-Z_]{1,32}")
    @ParamName("room_id")
    @JsonProperty("room_id")
    private String roomId;

    @ParamName("page")
    private Integer currPage = 1;

    @ParamName("page_size")
    @JsonProperty("page_size")
    private Integer pageSize = 20;

    private String from;

    @ParamName("start_time")
    @JsonProperty("start_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
}
